package sensorSelectionFramework;

public class SelectionControl {
	private Sensor sensor = null;
	private OptimalSensorsSet optimalSensorsSet= new OptimalSensorsSet();
	private SensorSet sensorSet = null;

	public void setSensor(Sensor sensor) {
		this.sensor = sensor;
	}

	public Sensor getSensor() {
		return sensor;
	}

	public void setOptimalSensorsSet(OptimalSensorsSet optimalSensorsSet) {
		this.optimalSensorsSet = optimalSensorsSet;
	}

	public SensorSet getOptimalSensorsSet() {
		return optimalSensorsSet;
	}

	public void setSensorSet(SensorSet sensorSet) {
		this.sensorSet = sensorSet;
	}

	public SensorSet getSensorSet() {
		return sensorSet;
	}
	
	public void RamdomSelection(SensorSet inputSet)
	{
		int totalCost = 0;
		for(Sensor sensor:inputSet.getSensorList())
		{
			totalCost += sensor.getCost();
			if(totalCost <= optimalSensorsSet.getBudget())
			{
				optimalSensorsSet.sensorList.add(sensor);
			}
			else
			{
				totalCost = totalCost-sensor.getCost();
			}
			
		}
		
	}
	public void greedySelection(SensorSet inputSet)
	{
		int totalCost = 0;
		
	}
	
}
